// 定义存储到本地的token的key
const KEY = 'my-token'
// 城市token
const CITYKEY = 'my-citytoken-vant-mobile'

const CITYVALUEKEY = 'my-cityvaluetoken-vant-mobile'
// 小区token
const COMMUNITYKEY = 'my-communitytoken-vant-mobile'
// 按需导出
// 获取token的函数
export const getToken = () => {
  return localStorage.getItem(KEY)
}
// 设置token的函数
export const setToken = (token) => {
  localStorage.setItem(KEY, token)
}
// 删除token的函数
export const delToken = () => {
  localStorage.removeItem(KEY)
}
// 城市token
export const getCityToken = () => {
  return localStorage.getItem(CITYKEY)
}

// 设置
export const setCityToken = (newToken) => {
  localStorage.setItem(CITYKEY, newToken)
}

// 删除
export const delCityToken = () => {
  localStorage.removeItem(CITYKEY)
}
// 城市value token
export const getCityValueToken = () => {
  return localStorage.getItem(CITYVALUEKEY)
}

// 设置
export const setCityValueToken = (newToken) => {
  localStorage.setItem(CITYVALUEKEY, newToken)
}

// 删除
export const delCityValueToken = () => {
  localStorage.removeItem(CITYVALUEKEY)
}
// 社区token
export const getCommunityToken = () => {
  return localStorage.getItem(COMMUNITYKEY)
}

// 设置
export const setCommunityToken = (newToken) => {
  localStorage.setItem(COMMUNITYKEY, newToken)
}

// 删除
export const delCommunityToken = () => {
  localStorage.removeItem(COMMUNITYKEY)
}
